//
//  CollectionViewCell.m
//  diaoyuren
//
//  Created by 钓鱼人 on 15/12/18.
//  Copyright © 2015年 game. All rights reserved.
//

#import "CollectionViewCell.h"
#import "Masonry.h"

@implementation CollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        _image = [[UIImageView alloc]init];

        [self.contentView addSubview:_image];
        
        
        [_image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.and.left.and.right.equalTo(self.contentView);
            make.height.equalTo(self.contentView.mas_width);
        }];
        
        _title = [[UILabel alloc]init];
        _title.textAlignment = NSTextAlignmentCenter;
        _title.font = font(SCREEN_WIDTH*0.04);
        _title.textColor = RGBA(0, 0, 0, 0.6);
//        _title.alpha = 0.6;
        [self.contentView addSubview:_title];
        
        [_title mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(_image.mas_bottom).offset(5);
            make.left.and.right.equalTo(self.contentView);
        }];
        
        
    }
    return self;
}
@end
